<template>
  <div class="search-page new-shoping">
    <!-- 顶部 -->
    <!-- <van-nav-bar title="搜索" left-arrow @click-left="goBack">
    </van-nav-bar> -->
    <my-header title="搜索" @onClickLeft="$router.push('/search')"/>
    <!-- / 顶部 -->

    <div class="move">
    <!-- 搜索 -->
    <van-search class="new-shoping" v-model="value" placeholder="搜索店铺" input-align="left" shape="round"/>
    <!-- / 搜索 -->

    <!-- 申请开店 -->
      <div class="apply-store blue" @click="applyStore">申请开店</div>
      <!-- / 申请开店 -->

      <!-- 申请开店 -->
      <div class="push-money blue" @click="pushMoney">推广赚钱</div>
      <!-- / 申请开店 -->
    </div>

    <!-- 历史搜索 -->
    <div class="history-search">
      <span>历史搜索</span>
        <div class="store-name-one">
          <span>美宜超市</span>
          <span>乐乐超市</span>
          <span>世纪超市</span>
        </div>
        <div class="store-name-two">
          <span>万达广场</span>
          <span>望云超市</span>
          <span>荣兴超市</span>
        </div>
    </div>
    <!-- / 历史搜索 -->

    <!-- 热门搜索 -->
    <div class="hot-search">
      <span>热门搜索</span>
        <div class="store-name-one">
          <span>美宜超市</span>
          <span>世纪超市</span>
          <span>望云超市</span>
        </div>
        <div class="store-name-two">
          <span>华瑞超市</span>
          <span>荣兴超市</span>
          <span>特惠超市</span>
        </div>
    </div>
    <!-- / 热门搜索 -->
  </div>
</template>

<script>
import MyHeader from '../my/components/my-header.vue'
export default {
  name: 'searchPage',
  components: {
    MyHeader
  },
  props: {},
  data () {
    return {}
  },
  computed: {},
  watch: {},
  created () {},
  mounted () {},
  methods: {
    goBack () {
      this.$router.back() // 返回上一层
    },
    applyStore: function () {
      this.$router.replace('/applyStore') // 跳转到 applyStore 页面 （ 申请开店界面 ）
    },
    pushMoney: function () {
      this.$router.replace('/pushMoney') // 跳转到 pushMoney 页面 （ 推广赚钱界面 ）
    }
  }
}
</script>

<style lang="less">
.search-page {
  .history-search,
  .hot-search {
    font-size: 14px;
    margin-top: 20px;
    margin-left: 50px;
    .store-name-one {
      margin-left: 20px;
      margin-top: 20px;
      span {
        margin-left: 70px;
      }
    }
    .store-name-two {
      margin-left: 20px;
      margin-top: 20px;
      span {
        margin-left: 70px;
      }
    }
  }
  .move {
    position: relative;
    .apply-store {
      position: absolute;
      top: 22px;
      left: 440px;
      font-size: 12px;
    }
    .push-money {
      position: absolute;
      top: 22px;
      left: 580px;
      font-size: 12px;
    }
  }
}
</style>
